// 仍然TLE

# include <iostream>
# include <vector>
# include <math.h>
# include <iomanip>
//# include <limits.h> linux
# include <float.h>

//# include<bits/stdc++.h>
using namespace std;
struct Toy
{
    double x;
    double y;
};
double dis(Toy& a, Toy& b)
{
    return sqrt(pow(a.x - b.x, 2) + pow(a.y - b.y, 2));
}
bool sortByX(Toy& a, Toy& b)
{
    if(a.x != b.x)
        return a.x < b.x;
    return a.y < b.y;
}
bool sortByY(Toy& a, Toy& b)
{
    return a.y < b.y;
}
//平面最近点对问题
//https://blog.csdn.net/hnu2012/article/details/70894678
double getMin(Toy* toys, int low, int high)
{
    if (high - low == 1)
    {
        return dis(toys[low], toys[high]);
    }
    else if (high - low == 2)
    {
        double dis1 = dis(toys[low], toys[low + 1]);
        double dis2 = dis(toys[low], toys[low + 2]);
        double dis3 = dis(toys[low + 1], toys[low + 2]);
        return min(min(dis1, dis2), dis3);
    }
    else
    {
        int mid = (high - low) / 2 + low;
        double leftMin = getMin(toys, low, mid);
        double rightMin = getMin(toys, mid + 1, high);
        double d = min(leftMin, rightMin);
        vector<Toy> res;
        for (int i = low; i <= high; ++i) //遍历一遍数组，得到与横坐标与  中点横坐标距离在d以内的点
        {
            if (fabs(toys[i].x - toys[mid].x) < d)
            {
                res.push_back(toys[i]);
            }
        }
        sort(res.begin(), res.end(), sortByY); //根据纵坐标从小到大排序
        for (int i = 0; i < res.size(); ++i)
        {
            for (int j = i + 1; j < res.size(); ++j)
            {
                if (res[j].y - res[i].y >= d)
                    break;
                double dd = dis(res[i], res[j]);
                d = min(dd, d);
            }
        }
        return d;
    }
}
int main()
{
    int N;
//    while (cin >> N && N)
//    {
//        vector<Toy> toys(N);
//        double minVal = DBL_MAX;
//        for (int i = 0; i < N; ++i)
//        {
//            cin >> toys[i].x >> toys[i].y;
//            // TLE
//            for (int j = 0; j < i; ++j)
//            {
//                double distance = dis(toys[i], toys[j]);
//                if (distance < minVal)
//                {
//                    minVal = distance;
//                }
//            }
//        }
//        cout << fixed << setprecision(2) << minVal / 2 << endl;
//    }
    
    // 平面最近点对问题：分治法
    while (cin >> N && N)
    {
//        vector<Toy> toys(N);
        Toy toys[100000];
        for (int i = 0; i < N; ++i)
        {
            cin >> toys[i].x >> toys[i].y;
        }
        sort(toys, toys + N, sortByX);
        cout << fixed << setprecision(2) << getMin(toys, 0, N - 1) / 2 << endl;
    }
    return 0;
}
